package com.arvato.minipro.service.wx;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.arvato.minipro.bean.bean_do.wx.VerifyTicketDo;
import com.arvato.minipro.bean.bean_vo.wx.VerifyTicketVo;
import com.arvato.minipro.mapper.wx.VerifyTicketMapper;

/**
 * 
 * @author: smallking
 * 
 * @Descibe:处理微信推送Ticket的Service
 * 
 * @Date: 2018年4月16日  下午3:08:16
 */
@Service
@Transactional
public class VerifyTicketService {
	
	@Autowired
	VerifyTicketMapper verifyTicketMapper;
	/**
	 * 插入一个VerifyTicket
	 * @param ticketDo
	 * @return
	 */
	public int insert(VerifyTicketDo verifyTicketDo) {
		return verifyTicketMapper.insert(verifyTicketDo);
	}
	/**
	 * 根据AppId查询Ticket
	 * @param appId
	 * @return
	 */
	public VerifyTicketVo getVerifyTicketByAppId(String appId) {
		return verifyTicketMapper.getVerifyTicketByAppId(appId);
	}
	/**
	 * 更新ticket
	 * @param verifyTicketDo
	 * @return
	 */
	public int update(VerifyTicketDo verifyTicketDo) {
		return verifyTicketMapper.update(verifyTicketDo);
	}
	
}
